# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-wsgiref
pkgver=0.1.2
pkgrel=3
pkgdesc='WSGI (PEP 333) Reference Library.'
arch=('any')
url='http://cheeseshop.python.org/pypi/wsgiref'
license=('PSF' 'ZPL')
depends=('python2')
makedepends=('python2-setuptools')
source=("http://pypi.python.org/packages/source/w/wsgiref/wsgiref-$pkgver.zip")
sha512sums=('80b7e9b039e40a2f8419e00b393a6516d80cf8de')

prepare() {
  cd "wsgiref-$pkgver"

  find . -name '*.py' -type f -exec \
    sed -ri 's:^#!/usr/bin/(env )?python$:&2:' '{}' \;
}

build() {
  cd "wsgiref-$pkgver"

  python2 setup.py build
}

package() {
  cd "wsgiref-$pkgver"

  python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
    --skip-build
}

